<?php
require_once("PHPMailer.php");
require_once("class.smtp.php");

				$mail=new PHPMailer();

				/*$mail->IsSMTP();                // set mailer to use SMTP
				$mail->Host = "smtp.1and1.es";  // specify main and backup server
				$mail->SMTPAuth = true;     // turn on SMTP authentication
				$mail->Username = "wixet@congdegnu.es";  // SMTP username
				$mail->Password = "29gatitosmensajeros"; // SMTP password
				*/
				$mail->From = "contacto@wixet.com";
				$mail->FromName = "Wixet";
				$mail->AddAddress($_POST['destino']);
				
				$mail->AddReplyTo("contacto@wixet.com", "Contacto");
				
				$mail->WordWrap = 50;                                 // set word wrap to 50 characters
				$mail->IsHTML(true);                                  // set email format to HTML
				
				$mail->Subject = $_POST['asunto'];

				$mail->Body = $_POST['cuerpo'];
				$mail->AltBody = "Lo siento pero tu navegador no cliente no soporta mensajes html";
				
	echo json_encode(array("error"=>!$mail->Send()));
?>
